package com.feng.cloud.common.exception;

import com.feng.cloud.common.exception.system.SystemStatus;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * @ClassName SystemException
 * @Description TODO
 * @Author Better Feng
 * @Date 2019/12/21 20:53
 * @Version 1.0
 **/
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class SystemException extends RuntimeException {
    private SystemStatus systemStatus;

    public SystemException(SystemStatus systemStatus){
        super(systemStatus.getMessage());
        this.systemStatus = systemStatus;
    }

    public SystemException(String error) {
        super(error);
    }
}
